﻿/************************************************************************
 * 项目名称 :  Lm.Core.Common.Commond  
 * 项目描述 :  扫描枪使用CMD命令16禁止HEX 
 * 类 名 称 :  ScanCMD
 * 版 本 号 :  v1.0.0.0 
 * 说    明 :  扫描枪使用CMD命令16禁止HEX
 * 作    者 :  Lewis
 * 创建时间 :  2022/3/25 14:20:22
 * 更新时间 :  2022/3/25 14:20:22
************************************************************************/
namespace Modules.Units.Commond
{
    public class ScanCMD
    {

        #region 私有属性

        #endregion


        #region  公开属性


        /// <summary>
        ///恢复默认模式
        /// </summary>
        public readonly byte[] RestoreDefault =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x44, 0x30, 0x31, 0x30, 0x30, 0x2E };

        /// <summary>
        /// 设置手动模式
        /// </summary>
        public readonly byte[] Manual =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x45, 0x30, 0x31, 0x30, 0x30, 0x30, 0x2E };


        /// <summary>
        /// 自动模式(普通)
        /// </summary>
        public readonly byte[] AutoGeneral =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x45, 0x30, 0x31, 0x30, 0x30, 0x33, 0x2E };


        /// <summary>
        /// 自动模式(快)
        /// </summary>
        public readonly byte[] AutoFast =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x45, 0x30, 0x31, 0x30, 0x30, 0x38, 0x2E };


        /// <summary>
        /// 执行扫描
        /// 扫描成功时返回：条码数据
        /// 扫描不成功，且配置“开启读码失败提示”时返回： NR
        /// 只在手动模式下生效
        /// </summary>
        public readonly byte[] RunScan = new byte[] { 0x02, 0xF4, 0x03 };

        /// <summary>
        /// 停止扫描
        /// 配置“开启读码失败提示”时返回： NR
        /// 只在手动模式下生效
        /// </summary>
        public readonly byte[] StopScan = new byte[] { 0x02, 0xF5, 0x03 };


        /// <summary>
        /// 扫描超时永不关闭
        /// </summary>
        public readonly byte[] ScanTimeOutNerverClose =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x45, 0x30, 0x31, 0x30, 0x35, 0x30, 0x2E };


        /// <summary>
        /// 打开扫描超时提示
        /// </summary>
        public readonly byte[] OpenScanTimeOutHint =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x32, 0x35, 0x30, 0x30, 0x32, 0x31, 0x2E };




        /// <summary>
        /// 关闭扫描超时提示
        /// </summary>
        public readonly byte[] CloseScanTimeOutHint =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x32, 0x35, 0x30, 0x30, 0x32, 0x30, 0x2E };



        /// <summary>
        /// 添加后缀回车换行
        /// </summary>
        public readonly byte[] AddSuffixAndEnter =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x39, 0x30, 0x33, 0x30, 0x30, 0x2E };


        /// <summary>
        /// 读取软件版本
        /// </summary>
        public readonly byte[] ReadSoftWareVersion =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x44, 0x31, 0x33, 0x30, 0x32, 0x3F, 0x2E };


        /// <summary>
        /// 存活检测
        /// </summary>
        public readonly byte[] Survive = new byte[] { 0x02, 0x41, 0x03 };


        /// <summary>
        /// 重启扫描器
        /// </summary>
        public readonly byte[] ResetScan =
            new byte[] { 0x02, 0xF0, 0x03, 0x30, 0x33, 0x30, 0x41, 0x30, 0x44, 0x2E };


        //============================== 扫描返回的HEX指令 ==============================

        /// <summary>
        /// 恢复默认设置返回的指令
        /// </summary>
        public readonly byte[] ReturnRestoreDefault =
            new byte[] { 0x30, 0x44, 0x30, 0x31, 0x30, 0x30, 0x06, 0x2E };


        /// <summary>
        /// 设置手动模式返回
        /// </summary>
        public readonly byte[] ReturnManual =
            new byte[] { 0x30, 0x45, 0x30, 0x31, 0x30, 0x30, 0x30, 0x06, 0x2E };

        /// <summary>
        /// 设置自动模式（普通）
        /// </summary>
        public readonly byte[] ReturnAutoGeneral =
            new byte[] { 0x30, 0x45, 0x30, 0x31, 0x30, 0x30, 0x33, 0x06, 0x2E };

        /// <summary>
        /// 设置自动模式（快速）
        /// </summary>
        public readonly byte[] ReturnAutoFast =
            new byte[] { 0x30, 0x45, 0x30, 0x31, 0x30, 0x30, 0x38, 0x06, 0x2E };


        /// <summary>
        /// 扫描错误
        /// </summary>
        public readonly string ScanError = "NR";


        /// <summary>
        /// 扫描超时永不关闭返回
        /// </summary>
        public readonly byte[] ReturnScanTimeOutNerverClose =
            new byte[] { 0x30, 0x45, 0x30, 0x31, 0x30, 0x35, 0x30, 0x06, 0x2E };


        /// <summary>
        /// 开启读码失败提示返回
        /// </summary>
        public readonly byte[] ReturnOpenScanTimeOutHint =
            new byte[] { 0x30, 0x32, 0x35, 0x30, 0x30, 0x32, 0x31, 0x06, 0x2E };

        /// <summary>
        /// 关闭读码失败提示返回
        /// </summary>
        public readonly byte[] ReturnCloseScanTimeOutHint =
            new byte[] { 0x30, 0x32, 0x35, 0x30, 0x30, 0x32, 0x30, 0x06, 0x2E };


        /// <summary>
        /// 添加后缀回车返回
        /// </summary>
        public readonly byte[] ReturnAddSuffixAndEnter =
            new byte[] { 0x30, 0x39, 0x30, 0x33, 0x30, 0x30, 0x06, 0x2E };


        /// <summary>
        /// 存活检测返回
        /// </summary>
        public readonly byte[] ReturnSurvive =
            new byte[] { 15 };

        #endregion


        #region 私有方法

        #endregion


        #region 公有方法

        #endregion


        #region 实现方法

        #endregion


    }
}
